<template>
	<view style="background-color: #f3f3f3;height:100vh;overflow: auto;">
		<view style='height:15vh'>
			<view style='text-align: center;margin-top:10vh;padding-bottom:10px'>
				您的订单金额为
			</view>
			<view class='amount'>{{amount}}</view>
		</view>
		<view>
			<view style='color:#909399;font-size:16px;padding:10px;'>
				请您打款到下面的账号，并且填写汇款备注，方便财务查账
			</view>
			<view >
				<view class='info'>打款账号</view>
				<view class='info'>收款户名：江门市新会区中盛陈皮食品有限公司</view>
				<view class='info'>银行：中国建设银行江门江会支行</view>
				<view class='info'>卡号：4406 7000 0004 6337</view>
				<view class='info'>汇款备注：订单{{invoiceId}}</view>
			</view>
		</view>
		<view style='padding:10px'>
			<u-button text='确定' type='primary'></u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				amount: 0,
				invoiceId: ''
			}
		},
		onLoad(options) {
			if(typeof(options.invoice) != 'undefined'){
				this.qrcode = `${getApp().globalData.apiBase}h5/pages/payment/redirect?invoice=${options.invoice}`
				this.invoiceId = options.invoice
				this.request.get(`public/invoices/${options.invoice}`).then((res) => {
					console.log(res.data)
					this.amount = res.data.amount
					this.invoiceId = res.data.id
				})
			}else{
				uni.showModal({
					title: '',
					content: '参数获取失败！',
					showCancel: false,
					success: () => {
						uni.switchTab({
							url: '/pages/index/index'
						})
					}
				})
			}
		},
		onShow(){
			
		},
		methods: {
			
		}
	}
</script>

<style>
	.amount{
		font-size: 32px;
		font-weight: bold;
		color: #19be6b;
		text-align: center;
	}
	.info{
		color: #303133;
		padding: 5px 10px;
		font-size: 18px;
	}
</style>
